<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>方格</title>
</head>
<body>
    <style>
        div{
            width: 500px;
            height: 300px;
            background-color: white;
            border-top: 5px blue solid;
            border-bottom: 5px yellow solid;
            border-left: 5px red solid ;
            border-right:5px green solid ;
            background-image: url(b.jpg);
            background-repeat: no-repeat;
            background-position: 50% 50%;
        }
    </style>
    <div></div>
</body>
</html>